package com.appleyk.sso.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * <p>越努力，越幸运</p>
 * 视图控制器
 * @author appleyk
 * @version V.0.1.1
 * @blob https://blog.csdn.net/appleyk
 * @date created on  11:08 下午 2021/1/7
 */
@Controller
public class PageController {
    @GetMapping("{page}")
    public String toPage(@PathVariable("page") String page){
        if("".equals(page) || page == null){
            return "home";
        }
        return page;
    }

    @GetMapping("/")
    public String home(){
        return "home";
    }
}
